-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
375 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.bundle | ||
.cache | ||
.kitchen | ||
bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source :rubygems | ||
|
||
gem 'test-kitchen' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
archive-tar-minitar (0.5.2) | ||
bunny (0.7.9) | ||
chef (10.14.4) | ||
bunny (>= 0.6.0, < 0.8.0) | ||
erubis | ||
highline (>= 1.6.9) | ||
json (>= 1.4.4, <= 1.6.1) | ||
mixlib-authentication (>= 1.3.0) | ||
mixlib-cli (>= 1.1.0) | ||
mixlib-config (>= 1.1.2) | ||
mixlib-log (>= 1.3.0) | ||
mixlib-shellout | ||
moneta | ||
net-ssh (~> 2.2.2) | ||
net-ssh-multi (~> 1.1.0) | ||
ohai (>= 0.6.0) | ||
rest-client (>= 1.0.4, < 1.7.0) | ||
treetop (~> 1.4.9) | ||
uuidtools | ||
yajl-ruby (~> 1.1) | ||
childprocess (0.3.6) | ||
ffi (~> 1.0, >= 1.0.6) | ||
coderay (1.0.8) | ||
erubis (2.7.0) | ||
ffi (1.1.5) | ||
foodcritic (1.6.1) | ||
erubis | ||
gherkin (~> 2.11.1) | ||
gist (~> 3.1.0) | ||
nokogiri (= 1.5.0) | ||
pry (~> 0.9.8.4) | ||
rak (~> 1.4) | ||
treetop (~> 1.4.10) | ||
yajl-ruby (~> 1.1.0) | ||
gherkin (2.11.5) | ||
json (>= 1.4.6) | ||
gist (3.1.0) | ||
hashr (0.0.22) | ||
highline (1.6.15) | ||
i18n (0.6.1) | ||
ipaddress (0.8.0) | ||
json (1.5.4) | ||
librarian (0.0.25) | ||
archive-tar-minitar (>= 0.5.2) | ||
chef (>= 0.10) | ||
highline | ||
thor (~> 0.15) | ||
log4r (1.1.10) | ||
method_source (0.7.1) | ||
mime-types (1.19) | ||
mixlib-authentication (1.3.0) | ||
mixlib-log | ||
mixlib-cli (1.2.2) | ||
mixlib-config (1.1.2) | ||
mixlib-log (1.4.1) | ||
mixlib-shellout (1.1.0) | ||
moneta (0.6.0) | ||
net-scp (1.0.4) | ||
net-ssh (>= 1.99.1) | ||
net-ssh (2.2.2) | ||
net-ssh-gateway (1.1.0) | ||
net-ssh (>= 1.99.1) | ||
net-ssh-multi (1.1) | ||
net-ssh (>= 2.1.4) | ||
net-ssh-gateway (>= 0.99.0) | ||
nokogiri (1.5.0) | ||
ohai (6.14.1) | ||
ipaddress | ||
mixlib-cli | ||
mixlib-config | ||
mixlib-log | ||
systemu | ||
yajl-ruby | ||
polyglot (0.3.3) | ||
pry (0.9.8.4) | ||
coderay (~> 1.0.5) | ||
method_source (~> 0.7.1) | ||
slop (>= 2.4.4, < 3) | ||
rak (1.4) | ||
rest-client (1.6.7) | ||
mime-types (>= 1.16) | ||
slop (2.4.4) | ||
systemu (2.5.2) | ||
test-kitchen (0.6.0) | ||
foodcritic (~> 1.4) | ||
hashr (~> 0.0.20) | ||
highline (>= 1.6.9) | ||
librarian (~> 0.0.20) | ||
mixlib-cli (~> 1.2.2) | ||
vagrant (~> 1.0.2) | ||
yajl-ruby (~> 1.1.0) | ||
thor (0.16.0) | ||
treetop (1.4.11) | ||
polyglot | ||
polyglot (>= 0.3.1) | ||
uuidtools (2.1.3) | ||
vagrant (1.0.5) | ||
archive-tar-minitar (= 0.5.2) | ||
childprocess (~> 0.3.1) | ||
erubis (~> 2.7.0) | ||
i18n (~> 0.6.0) | ||
json (~> 1.5.1) | ||
log4r (~> 1.1.9) | ||
net-scp (~> 1.0.4) | ||
net-ssh (~> 2.2.2) | ||
yajl-ruby (1.1.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
test-kitchen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,18 @@ | ||
default[:erlang][:gui_tools] = false | ||
# | ||
# Author:: Joshua Timberman <joshua@opscode.com> | ||
# Copyright:: Copyright (c) 2012, Opscode, Inc. <legal@opscode.com> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
default['erlang']['gui_tools'] = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# | ||
# Cookbook:: erlang | ||
# Minitest Chef Handler | ||
# | ||
# Author:: Joshua Timberman <joshua@opscode.com> | ||
# Copyright:: Copyright (c) 2012, Opscode, Inc. <legal@opscode.com> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
require File.expand_path('../support/helpers', __FILE__) | ||
|
||
describe 'erlang::default' do | ||
include Helpers::Erlang | ||
|
||
it 'doesnt install the gui_tools if the attribute is false (default)' do | ||
skip unless node['platform_family'] == 'debian' | ||
skip if node['erlang']['gui_tools'] | ||
package("erlang-gs").wont_be_installed | ||
end | ||
|
||
it 'can process erlang code with the erl command ' do | ||
erl = shell_out("erl -myflag 1 <<-EOH | ||
init:get_argument(myflag). | ||
EOH | ||
") | ||
erl.stdout.include?('{ok,[["1"]]}') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# | ||
# Cookbook:: erlang | ||
# | ||
# Author:: Joshua Timberman <joshua@opscode.com> | ||
# Copyright:: Copyright (c) 2012, Opscode, Inc. <legal@opscode.com> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
module Helpers | ||
module Erlang | ||
require 'chef/mixin/shell_out' | ||
include Chef::Mixin::ShellOut | ||
include MiniTest::Chef::Assertions | ||
include MiniTest::Chef::Context | ||
include MiniTest::Chef::Resources | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# Author:: Joshua Timberman <joshua@opscode.com> | ||
# Copyright:: Copyright (c) 2012, Opscode, Inc. <legal@opscode.com> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
cookbook "erlang" do | ||
configuration "default" | ||
configuration "gui_tools" | ||
exclude :platform => "centos", :configuration => "gui_tools" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# CHANGELOG for erlang_test | ||
|
||
This file is used to list changes made in each version of erlang_test. | ||
|
||
## 0.1.0: | ||
|
||
* Initial release of erlang_test | ||
|
||
- - - | ||
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown. | ||
|
||
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Description | ||
=========== | ||
|
||
Requirements | ||
============ | ||
|
||
Attributes | ||
========== | ||
|
||
Usage | ||
===== | ||
|
30 changes: 30 additions & 0 deletions
30
test/kitchen/cookbooks/erlang_test/files/default/tests/minitest/gui_tools_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# Cookbook:: erlang | ||
# Minitest Chef Handler | ||
# | ||
# Author:: Joshua Timberman <joshua@opscode.com> | ||
# Copyright:: Copyright (c) 2012, Opscode, Inc. <legal@opscode.com> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
require File.expand_path('../support/helpers', __FILE__) | ||
|
||
describe 'erlang::default' do | ||
include Helpers::Erlang | ||
|
||
it 'installs the x11 package if gui_tools is true' do | ||
skip unless node['platform_family'] == 'debian' | ||
package("erlang-gs").must_be_installed | ||
end | ||
end |
29 changes: 29 additions & 0 deletions
29
test/kitchen/cookbooks/erlang_test/files/default/tests/minitest/support/helpers.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# | ||
# Cookbook:: erlang | ||
# | ||
# Author:: Joshua Timberman <joshua@opscode.com> | ||
# Copyright:: Copyright (c) 2012, Opscode, Inc. <legal@opscode.com> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
module Helpers | ||
module Erlang | ||
require 'chef/mixin/shell_out' | ||
include Chef::Mixin::ShellOut | ||
include MiniTest::Chef::Assertions | ||
include MiniTest::Chef::Context | ||
include MiniTest::Chef::Resources | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
maintainer "Opscode, Inc." | ||
maintainer_email "cookbooks@opscode.com" | ||
license "Apache 2.0" | ||
description "Installs/Configures erlang_test" | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | ||
version "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Cookbook Name:: erlang_test | ||
# Recipe:: default | ||
# | ||
# Copyright 2012, Opscode, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
include_recipe "erlang::default" |
Oops, something went wrong.